# scripts/test.py
import os
import django


# 设置 Django 环境
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'backend.settings')
django.setup()
from algorithm.services import list_all_tag_values
from algorithm.services import list_all_tag_importance

import pandas as pd
from django.conf import settings

#list_all_tag_values()
#
# list_all_tag_importance()


from utils.plot_function import plot_function_vectorized,plot_function_single
from algorithm.utils import (mastery_level1, logistic_function, mastery_level2, inverted_sigmoid,
                             inverted_mastery_level2, inverted_mastery_level2_single, inverted_mastery_level1,mastery_level3)
from recommendation.services import get_user_problem_numbers, get_user_problem_numbers_via_json
# plot_function_single(mastery_level1,(0,1))
# plot_function_vectorized(mastery_level2,(0,1))
# plot_function_vectorized(inverted_sigmoid,(0,1))
# plot_function_vectorized(inverted_mastery_level2,(0,1))
# plot_function_vectorized(inverted_mastery_level1,(0,1))
# plot_function_vectorized(mastery_level3,(0,1))

from utils.export_user_data_to_md import export_user_data_to_md
from recommendation.services import get_user_problem_numbers
uid = 805522
for problem in get_user_problem_numbers(uid):
    print(problem)
# export_user_data_to_md(8)
print(" via json ")
for problem in get_user_problem_numbers_via_json(uid):
    print(problem)
